
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<%@page import="com.tss.util.*"%>
<%@page import="com.jedi.*"%>
<%@page import="com.store.*"%>
<%@page import="java.util.*"%>
<%@page import="java.text.*"%>
<%@include file="../global_var.jsp"%>
<%@include file="../check_login.jsp"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";

%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <base href="<%=basePath%>">
    
<title>My JSP 'techcontract_add.jsp' starting page</title>
    
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    <link href="style/main.css" rel="stylesheet" type="text/css">
	<script language="javascript" src="js/common.js"></script>
	<script language="javascript">
   function clk_goback() {
	history.back();
}
</script>
<%
 String strErr = "";

String taskid       = ParamUtils.getParameter(request,"taskid","0");


double spartfee     =ParamUtils.getDoubleParameter(request,"spartfee",0.00);
double outefee       =ParamUtils.getDoubleParameter(request,"outefee",0.00);
double tripfee      =ParamUtils.getDoubleParameter(request,"tripfee",0.00);
int monthin             = ParamUtils.getIntParameter(request,"monthin",1);
 String cmd = ParamUtils.getParameter(request,"cmd","");
String year = ParamUtils.getParameter(request,"year","");
String month = ParamUtils.getParameter(request,"month","");
PalvMgr palvMgr = new PalvMgr();
Palv palv= palvMgr.get(taskid);

if (palv == null || palv.getTaskid()==0) strErr = "此信息不存在!";
if (!cmd.trim().equals("")) {

 //taskid        = ParamUtils.getParameter(request,"taskid","0");

 //worktime         = ParamUtils.getParameter(request,"worktime","0");
// spartfee      = ParamUtils.getParameter(request,"spartfee","0.00");
 //outefee       = ParamUtils.getParameter(request,"outefee","0.00");
 //tripfee       = ParamUtils.getParameter(request,"tripfee","0.00");
 //month        = ParamUtils.getParameter(request,"month","");
	// year          = ParamUtils.getParameter(request,"year","");     



}


      if (strErr.trim().equals("")) {
		
	
		//worktime=pal.getWorktime()+"";
		//spartfee=pal.getSpartfee()+"";
		//outefee=pal.getOutefee()+"";
		//tripfee=pal.getTripfee()+"";
	    year=palv.getY()+"";
		month=palv.getM()+"";
		
		}
    %>
   <script language="javascript" >
   function clk_submit() {
	var oForm = document.operatorForm;
	oForm.cmd.value = "update";
	return true;
}

</script>
</head>

<body  leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td >
     <form name="operatorForm" method="post" onSubmit="return clk_submit();">
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td height="100" align="center" valign="top" style="padding-top:10px;padding-bottom:10px;">
            <table width="98%" border="0" cellpadding="1" cellspacing="1" bgcolor="#000000">
			

               <%if (!strErr.trim().equals("")) {%>
              <tr> 
                <td height="24" colspan="7" bgcolor="#D7D7DB" style="padding-left:10px;">
                  错误提示：
                 
                  <font color=red><%=strErr%></font>                </td>
              </tr>
              <%}%>
              
              <tr> 
                <td height="24" colspan="7" bgcolor="#858585" style="padding-left:10px;">
                  <font color="#FFFFFF"><strong>损益分析信息</strong></font>  </td>
              </tr>
              <tr> 
                <td width="17%" height="24" align="right" bgcolor="#D7D7DB" style="padding-right:5px;">
                <span style="padding-left:5px;"><font color="red">*</font></span>工单编号：</td>
                <td width="83%" colspan="6" bgcolor="#EDEDF0" style="padding-left:5px;">
                  <input name="conid" type="text" value="<%=taskid%>" size="25" maxlength="50" readonly="readonly" >
                   &nbsp;&nbsp;</td>
              </tr>
			  
              <tr>
                   <td height="24" align="right" bgcolor="#D7D7DB" style="padding-right:5px;" >项目名称：</td>
                   <td bgcolor="#EDEDF0" style="padding-left:5px;" colspan="6" >
                   <input name="prjname" type="text" value="<%=palv.getPrjname()%>" id="prjname" size="25" maxlength="25" readonly="readonly"> 
                   
                   </td>
              </tr> 
			 <tr>
                   <td height="24" align="right" bgcolor="#D7D7DB" style="padding-right:5px;" >项目经理：</td>
                   <td bgcolor="#EDEDF0" style="padding-left:5px;" colspan="6" >
                   <input name="user_name" type="text" value="<%=palv.getUser_name()%>" id="user_name" size="25" maxlength="25" readonly="readonly"> 
                   
                   </td>
              </tr> 
               <tr>
                   <td height="24" align="right" bgcolor="#D7D7DB" style="padding-right:5px;" >备件成本：</td>
                   <td bgcolor="#EDEDF0" style="padding-left:5px;" colspan="6" >
                   <input name="spartfee" type="text" value="<%=FormatNum.formatNumber(palv.getSpartfee())%>"  size="25" maxlength="25" readonly="readonly"> ￥
                   
                   </td>
              </tr> 
               <tr>
                   <td height="24" align="right" bgcolor="#D7D7DB" style="padding-right:5px;" >外部人员技术成本：</td>
                   <td bgcolor="#EDEDF0" style="padding-left:5px;" colspan="6" >
                   <input name="outefee" type="text" value="<%=FormatNum.formatNumber(palv.getOutefee())%>" id="outefee" size="25" maxlength="25" readonly="readonly"> ￥
                   
                   </td>
              </tr> 
             
              <tr>
                   <td height="24" align="right" bgcolor="#D7D7DB" style="padding-right:5px;" >差旅费：</td>
                   <td bgcolor="#EDEDF0" style="padding-left:5px;" colspan="6" >
                   <input name="tripfee" type="text" value="<%=FormatNum.formatNumber(palv.getTripfee())%>" id="tripfee" size="25" maxlength="25" readonly="readonly"> ￥
                   
                   </td>
              </tr> 
                <tr>
                   <td height="24" align="right" bgcolor="#D7D7DB" style="padding-right:5px;" >是否有收入：</td>
                   <td bgcolor="#EDEDF0" style="padding-left:5px;" colspan="6" >
                <%=palv.getMonthin_name()%>
                   </td>
                
              </tr> 
                <tr>
                  <td height="24" align="right" bgcolor="#D7D7DB" style="padding-right:5px;"><p>核算年：</p>   
				 </td>
                  <td bgcolor="#EDEDF0" style="padding-left:5px;" colspan="6">
                  	
                  <%=palv.getY()%>年 &nbsp;<%=palv.getM()%>月   &nbsp;</td>
                </tr>
              
              <tr> 
                <td bgcolor="#EDEDF0" colspan="7" align="center">
                  <input type="hidden" name="submit" value="保存" class="inputButton"> 
                  <input type="hidden" name="reset" value="重写" class="inputButton">    
                    <input type="button" onClick="clk_goback();" name="btn" value="返回" class="inputButton">  
                  <input type="hidden" name="cmd" value="">              
                  </td>
              </tr>
            </table>
          </td>
        </tr>
       
      </table>
      </form>
    </td>
  </tr>
</table>

<%if (cmd.equals("update") && strErr.trim().equals("")){%>
<script language="javascript">
alert("信息修改成功系统将返回首页!");
location.href="analysis_list.jsp";
</script>
<%}%>
<iframe width="168" height="190" name="gToday:normal:agenda.js" id="gToday:normal:agenda.js" src="calendar/ipopeng.htm" scrolling="no" frameborder="0"
			style="BORDER-RIGHT:2px ridge; BORDER-TOP:2px ridge; Z-INDEX:999; LEFT:-500px; VISIBILITY:visible; BORDER-LEFT:2px ridge; BORDER-BOTTOM:2px ridge; POSITION:absolute; TOP:0px">
</iframe>
</body>
</html>
